// vite.config.ts
import { fileURLToPath, URL } from "node:url";
import { defineConfig, loadEnv } from "file:///F:/demo_jx/github-nest/vue3-nest-admin/node_modules/vite/dist/node/index.js";
import vue from "file:///F:/demo_jx/github-nest/vue3-nest-admin/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import vueJsx from "file:///F:/demo_jx/github-nest/vue3-nest-admin/node_modules/@vitejs/plugin-vue-jsx/dist/index.mjs";
import AutoImport from "file:///F:/demo_jx/github-nest/vue3-nest-admin/node_modules/unplugin-auto-import/dist/vite.js";
import Components from "file:///F:/demo_jx/github-nest/vue3-nest-admin/node_modules/unplugin-vue-components/dist/vite.js";
import { ElementPlusResolver } from "file:///F:/demo_jx/github-nest/vue3-nest-admin/node_modules/unplugin-vue-components/dist/resolvers.js";
import Icons from "file:///F:/demo_jx/github-nest/vue3-nest-admin/node_modules/unplugin-icons/dist/vite.js";
import IconsResolver from "file:///F:/demo_jx/github-nest/vue3-nest-admin/node_modules/unplugin-icons/dist/resolver.js";
import { createSvgIconsPlugin } from "file:///F:/demo_jx/github-nest/vue3-nest-admin/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import path from "node:path";
var __vite_injected_original_import_meta_url = "file:///F:/demo_jx/github-nest/vue3-nest-admin/vite.config.ts";
var vite_config_default = defineConfig(({ mode }) => {
  const env = loadEnv(mode, process.cwd());
  return {
    css: {
      // CSS 预处理器
      preprocessorOptions: {
        //define global scss variable
        scss: {
          javascriptEnabled: true,
          additionalData: `@use "@/styles/variables.scss" as *;`
        }
      }
    },
    server: {
      // 允许IP访问
      host: "0.0.0.0",
      // 应用端口 (默认:3000)
      port: Number(env.VITE_APP_PORT),
      // 运行是否自动打开浏览器
      open: true,
      proxy: {
        /**
         * 反向代理解决跨域配置
         * http://localhost:3000/dev-api/users (F12可见请求路径) => http://localhost:8989/users (实际请求后端 API 路径)
         *
         * env.VITE_APP_BASE_API: /dev-api
         * env.VITE_APP_TARGET_URL: http://localhost:8989
         * env.VITE_APP_TARGET_BASE_API: ""
         */
        [env.VITE_APP_BASE_API]: {
          changeOrigin: true,
          target: env.VITE_APP_TARGET_URL,
          rewrite: (path2) => path2.replace(
            new RegExp("^" + env.VITE_APP_BASE_API),
            env.VITE_APP_TARGET_BASE_API
          )
        }
      }
    },
    plugins: [
      vue(),
      vueJsx(),
      // VueDevTools(),
      AutoImport({
        // 自动导入 Vue 相关函数，如：ref, reactive, toRef 等
        imports: ["vue", "@vueuse/core"],
        // 自动导入 Element Plus 相关函数，如：ElMessage, ElMessageBox... (带样式)
        resolvers: [ElementPlusResolver(), IconsResolver({})],
        eslintrc: {
          enabled: false,
          filepath: "./.eslintrc-auto-import.json",
          globalsPropValue: true
        },
        vueTemplate: true,
        // 配置文件生成位置(false:关闭自动生成)
        // dts: false,
        dts: "src/types/auto-imports.d.ts"
      }),
      Components({
        resolvers: [
          // 自动导入 Element Plus 组件
          ElementPlusResolver(),
          // 自动注册图标组件
          IconsResolver({ enabledCollections: ["ep"] })
        ],
        // 指定自定义组件位置(默认:src/components)
        dirs: ["src/**/components"],
        // 配置文件位置 (false:关闭自动生成)
        // dts: false,
        dts: "src/types/components.d.ts"
      }),
      Icons({
        autoInstall: true
      }),
      createSvgIconsPlugin({
        // 指定需要缓存的图标文件夹
        iconDirs: [path.resolve(process.cwd(), "src/assets/icons")],
        // 指定symbolId格式
        symbolId: "icon-[dir]-[name]"
      })
    ],
    resolve: {
      alias: {
        "@": fileURLToPath(new URL("./src", __vite_injected_original_import_meta_url))
      }
    }
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJGOlxcXFxkZW1vX2p4XFxcXGdpdGh1Yi1uZXN0XFxcXHZ1ZTMtbmVzdC1hZG1pblwiO2NvbnN0IF9fdml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